

<!DOCTYPE html>
<html>

<head>
   
    
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<!--360浏览器优先以webkit内核解析-->


<title>费用申请明细</title>
    <script src="__STATIC__/layout/js/jquery.min.js"></script>
<link rel="shortcut icon" href="__STATIC__/layout/favicon.ico">
<link href="__STATIC__/layout/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <script src="__STATIC__/layout/js/bootstrap.min.js?v=3.3.6"></script>
<link href="__STATIC__/layout/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
<link href="__STATIC__/layout/css/animate.css" rel="stylesheet">
<!--<link href="__STATIC__/layout/css/style.css?v=4.1.0" rel="stylesheet">-->
<link href="__STATIC__/layout/css/channel.css?v=4.1.0" rel="stylesheet">
<!-- Sweet Alert -->
<link href="__STATIC__/layout/css/plugins/sweetalert/sweetalert.css" rel="stylesheet">
<script src="__STATIC__/layout/js/plugins/suggest/bootstrap-suggest.min.js"></script>
<!--<link href="__STATIC__/layout/js/plugins/select/bootstrap-select.css" rel="stylesheet">-->
<link rel="stylesheet" href="__STATIC__/layout/css/demo.css" type="text/css">
<link href="__STATIC__/layout/css/gyq.css" rel="stylesheet">
<link href="__STATIC__/xds/js/select2/css/select2.css" rel="stylesheet" />
<script src="__STATIC__/xds/js/select2/js/select2.js"></script>
<script src="__STATIC__/layout/js/jquery.cookie.js?"></script>

    <style>
        #form1 p{
            line-height: 20px;
            padding: 4px;
        }
        .titleImg{
            width: 20px;
            height: 20px;
            margin-right: 8px;
            display: inline-block;
            vertical-align: middle;
        }
        .table{
            margin-bottom: 10px;
        }
          .handup{
            color: #a6e1fc;
            display: inline-block;
            padding-left: 10px;
            cursor: pointer;
        }
         .btn-white.active{
            color: #fff;
            background-color: #337ab7;
        }
        .bootstrap-select{
            height: 36px;
            border-radius: 6px;
        }
        .bootstrap-select .btn-default {
             border-radius: 6px;
             background-color: #fff; 
             border-color: #c2c2c2; 
             color: #333; 
            }
        .btn-default:hover, .btn-default:focus, .btn-default:active, .btn-default.active, .open .dropdown-toggle.btn-default{
            border-radius: 6px;
             background-color: #fff; 
             border-color: #c2c2c2; 
             color: #333; 
         }
    </style>

</head>

<body class="white-bg" style="padding: 3px;font-size: 13px">
    <div class="page-heade">
       <h2 class="title_color text-center">费用申请明细</h2>
    </div>
    <form action="" class="form-inline" id="form1">
        <input name="ti_id" value="{$id}" type="hidden"/>
        <input name="jxs_id" value="{$jxsid}" type="hidden"/>
        <p><img  class="titleImg" src="__STATIC__/layout/img/activityXiTong.png" alt=""><b>基本信息</b></p>
        <!--基本信息-->
        <table class="table table-bordered bud_hei">
            <thead>
                <tr class="info">
                    <th class="text-center">活动期间</th>
                    <th class="text-center">预算期间</th>
                    <th class="text-center">预计核销日期</th>
                    <th class="text-center">活动简述及目的</th>
                    <th class="text-center">所属专项方案</th>
                </tr>
            </thead>
            <tbody>
                <tr class="text-center">
                    <td>
                        <span class="xds_addTime"  whereTime="startName:s1,endName:s2,jisuanshijiancha:#actionText,GetDateStr:#yujihexiaotime,disabled:1" >
                        </span>
                        <span class="text-danger"  id="actionText"></span>
                    </td>
                    <td class="xds_addTime"  whereTime="startName:start,endName:end,disabled:1" >
                    </td>
                    <td><input type="text" id="yujihexiaotime"  name="expCanTime" class="form-control"></td>
                    <td><input type="text" class="form-control" name="brief" style="width: 95%"></td>
                    <td>无</td>
                </tr>
            </tbody>
        </table>
        <p><img  class="titleImg" src="__STATIC__/layout/img/activityXiTong.png" alt=""><b>费用详情</b></p>
        <table class="table table-bordered bud_hei">
            <thead>
                <tr class="info">
                    <th class="text-center">费用类型</th>
                    <th class="text-center">支付方式</th>
                    <th class="text-center">未税总额</th>
                    <th class="text-center">收款方</th>
                    <th class="text-center">成本中心</th>
                    <th class="text-center">费用说明</th>
                    <th class="text-center">
                        <button class="btn btn-success " type="button" id="FeiYongLeiXingAn" onclick="addHang()" >
                            <i class="fa fa-plus-square"></i>&nbsp;&nbsp;
                            <span class="bold" >添加</span>
                        </button>
                    </th>
                </tr>
            </thead>
            <tbody id="FeiYongLeiXingList">

            </tbody>
        </table>
         <p style=""><img  class="titleImg" src="__STATIC__/layout/img/activityXiTong.png" alt=""><b>客户详情</b>&nbsp;&nbsp;&nbsp;
             <div   id="is_kehuxiangqing">

              </div>

         </p>
        <table class="table table-bordered bud_hei" id="angencyTable" style="display: none;">
            <tr>
                <td><b>长沙市骏鸿实业有限公司</b></td>
            </tr>
        </table>
         <table class="table table-bordered bud_hei" id="netTable" style="display: none;">
            <tr>
                <td>
                     <div class="input-group form-group" id="WangDian" style="display: inline-block;" >

                    </div>

                </td>
            </tr>
        </table>
        <table class="table table-bordered bud_hei" id="sysTable" >
            <thead>
                <tr class="info">
                    <th class="text-center">系统</th>
                    <th class="text-center">费用占比</th>
                    <th class="text-center">预计投放网点数</th>
                    <th class="text-center">
                        <button class="btn btn-success " type="button" onclick="addHang2()"><i class="fa fa-plus-square"></i>&nbsp;&nbsp;<span class="bold">添加</span>
                        </button>
                    </th>
                </tr>
            </thead>
            <tbody   id="JinXiaoShangZhu">

            </tbody>
        </table>
         <p><img  class="titleImg" src="__STATIC__/layout/img/activityXiTong.png" alt=""><b>产品详情</b>&nbsp;&nbsp;&nbsp;
                     <div id="is_changpingxiangqin">

                     </div>

                     <i id="proText">注：产品费用占比加起来必须等于100%,如果不填费用占比则平摊</i>
         </p>

        <table class="table table-bordered bud_hei"   id="proTable0">
            <thead>
            <tr class="info">
                <th class="text-center">产品</th>
                <th class="text-center">费用占比</th>
                <th class="text-center">产品说明</th>
                <th class="text-center">
                    <button class="btn btn-success " type="button" onclick="addHang3()">
                        <i class="fa fa-plus-square"></i>&nbsp;&nbsp;<span class="bold">添加</span>
                </button></th>
            </tr>
            </thead>
            <tbody id="Cpxq0">

            </tbody>
        </table>
        <table class="table table-bordered bud_hei"  style="display: none;" id="proTable1">
            <thead>
            <tr class="info">
                <th class="text-center">产品</th>
                <th class="text-center">费用占比</th>
                <th class="text-center">产品说明</th>
                <th class="text-center"> <button class="btn btn-success " type="button" onclick="addHang4()"><i class="fa fa-plus-square"></i>&nbsp;&nbsp;<span class="bold">添加</span>
                </button></th>
            </tr>
            </thead>
            <tbody id="Cpxq1">

            </tbody>
        </table>
        <table class="table table-bordered bud_hei"  style="display: none;" id="proTable2">
            <thead>
            <tr class="info">
                <th class="text-center">产品</th>
                <th class="text-center">费用占比</th>
                <th class="text-center">产品说明</th>
                <th class="text-center"> <button class="btn btn-success " type="button" onclick="addHang5()"><i class="fa fa-plus-square"></i>&nbsp;&nbsp;<span class="bold">添加</span>
                </button></th>
            </tr>
            </thead>
            <tbody id="Cpxq2">

            </tbody>
        </table>
        <table class="table table-bordered bud_hei"  style="display: none;" id="proTable3">
            <thead>
            <tr class="info">
                <th class="text-center">产品</th>
                <th class="text-center">费用占比</th>
                <th class="text-center">产品说明</th>
                <th class="text-center">
                    <button class="btn btn-success " type="button" onclick="addHang6()">
                        <i class="fa fa-plus-square"></i>&nbsp;&nbsp;<span class="bold">添加</span>
                    </button>
                </th>
            </tr>
            </thead>
            <tbody id="Cpxq3">

            </tbody>
        </table>
        <table class="table table-bordered bud_hei" id="proTable4" style="display: none;">
            <thead>
                <tr class="info">
                    <th class="text-center">产品</th>
                    <th class="text-center">产品说明</th>
                    <th class="text-center">
                        <button class="btn btn-success " type="button" onclick="addHang7()"><i class="fa fa-plus-square"></i>&nbsp;&nbsp;<span class="bold">添加</span>
                        </button>
                    </th>
                </tr>
            </thead>
            <tbody id="Cpxq4">

            </tbody>
        </table>
        <p>
            <img  class="titleImg" src="__STATIC__/layout/img/activityXiTong.png" alt="">
            <b>销量预测</b>&nbsp;&nbsp;&nbsp;
            <div id="is_shejixiaoliang">
            </div>

        </p>
        <table class="table table-bordered bud_hei" id="sallycTable">
            <thead>
                <tr class="info">
                    <th class="text-center">预计销售类型</th>
                    <th class="text-center">不做活动销售额</th>
                    <th class="text-center">做活动销售额</th>
                    <th class="text-center">增量销售额</th>
                    <th class="text-center">申请费用额合计</th>
                    <th class="text-center">预计费用率</th>
                </tr>
            </thead>
            <tbody>
                <tr class="text-center">
                    <td>
                        <select name="" id="" class="form-control">
                            <option value="0">请选择</option>
                        </select>
                    </td>
                    <td>
                         <div class="input-group">
                        <input type="text" class="form-control" aria-label="RMB" style="width: 60px;height: 30px" >
                         <span class="input-group-addon">元</span>
                        </div>
                    </td>
                    <td>
                         <div class="input-group">
                        <input type="text" class="form-control" aria-label="RMB" style="width: 60px;height: 30px" >
                         <span class="input-group-addon">元</span>
                        </div>
                    </td>
                    <td></td>
                    <td class="text-right">2321.3元</td>
                    <td class="text-right"></td>
                </tr>
            </tbody>
        </table>



 </form>
<!-- 全局js -->

<script src="__STATIC__/layout/js/contabs_sub.js"></script>

<!-- Sweet alert -->
<script src="__STATIC__/layout/js/plugins/sweetalert/sweetalert.min.js"></script>
<script src="__STATIC__/layout/js/plugins/laydate/laydate.js"></script>

   <!--<script type="text/javascript" src="__STATIC__/layout/js/plugins/select/bootstrap-select.js"></script> -->
    <!-- Chosen -->
<script src="__STATIC__/layout/js/plugins/chosen/chosen.jquery.js"></script>
<script src="__STATIC__/layout/js/plugins/layer/layer.min.js"></script>

<script src="__STATIC__/xds/js/time.js"></script>
<script src="__STATIC__/xds/js/select.js"></script>
<script src="__STATIC__/xds/js/tifeiyong.js"></script>
<script src="__STATIC__/xds/js/addTr.js"></script>
<script>
        $(function () {
            $('body').on('click','input[type=text]',function () {
                this.select()
            })
        })

        $(document).on("click","input[name=options]",function(){
            $(this).parent('label').siblings().removeClass('active')
            $(this).parent('label').addClass('active')
        })


        //费用类型

        function mu(type,id) {
            if(type==1){
                $('#myModal1'+id).modal('show');
                $('#xgcbzx'+id).show();
            }
        }
        function tijiao(id) {


            var l = '';
            var m = 0;
            var sum = 0;
            $('.divTid'+id).each(function () {

                sum += Number($(this).find('.inpbai').val());
            });
            if(sum!=100){m =2;};
            $('.divTid'+id).each(function () {

                if($(this).find('.inpbai').val()==''||$(this).find('.inpbai').val()==0){

                    var z =  $(this).find('.uiName').text();

                    if(l==''){
                        l += z;
                    }else {
                        l += ','+ z;
                    }
                    m = 1;
                }

            });
            if(m==1){
                swal('',l+'，请填写占比！','warning');
            }else if(m==2){
                swal('','占比加起来必须等于100%！','warning');
            }else {
                alert('提交成功');
                $("#myModal"+id).modal('hide');

                var str2= '';
                $('.divTid'+id).each(function () {
                    var uiName=$(this).find('.uiName').text();
                    var  tid = $(this).find('.uiName').siblings('input').attr('tid');
                    var inpbai=$(this).find('.inpbai').val()
                    str2 += '<p class="psClassName" psid="'+tid+'" psTo="'+inpbai+'"><span>'+uiName+'</span>,'+inpbai+'%</p>'
                });
                $("#showSelectText"+id).html(str2);
            }
        }
        function tijiao2(id) {
            $("#myModal1"+id).modal('hide');
            //$('#xgcbzx'+id).modal('hide');
        }
        function del_this(obj,id) {
                console.log(obj.parent().parent().siblings());
                if(obj.parent().parent().siblings().length<1){

                    alert("至少保留一行")
                }else{

                    $(id).remove();

                }

        }
        function setSelect(id){
            var strtext = $('#multiples'+id).select2('data');
            var a=[];
            for(var i=0;i<strtext.length;i++){
                a[strtext[i].id] = strtext[i].text;

            }
            var b=[];
            $("#selectDiv"+id+" .divTid").each(function(){
                b[$(this).attr('tid')]=$(this).find('.inpbai').val();
            })
            var str = '' ;
            o = 0;
            for(key in a){
                o++;
                if(b.hasOwnProperty(key)){
                    str += '<div class="padding-10 divTid'+id+'" tid="'+key+'">'+
                        '<div class="form-group"><input class="tid" type="hidden" value="'+key+'"/>'+o+'.<span class="uiName">'+a[key]+'</span></div>'+
                        '<div class="form-group" style="float: right;">'+
                        '<div class="input-group">'+
                        '<input type="text" class="form-control inpbai" aria-label="%" style="width: 60px;height: 30px" value="'+b[key]+'" >'+
                        '<span class="input-group-addon">%</span>'+
                        '</div>'+
                        '</div>'+
                        '</div>';
                }else{
                    str += '<div class="padding-10 divTid'+id+'" tid="'+key+'">'+
                        '<div class="form-group"><input class="tid" value="'+key+'" style="display: none"/>'+o+'.<span class="uiName">'+a[key]+'</span></div>'+
                        '<div class="form-group" style="float: right;">'+
                        '<div class="input-group">'+
                        '<input type="text" class="form-control inpbai" aria-label="%" style="width: 60px;height: 30px" value="" >'+
                        '<span class="input-group-addon">%</span>'+
                        '</div>'+
                        '</div>'+
                        '</div>';
                }
            }

            $("#selectDiv"+id).html(str);
        }
        function h(id) {
            entranceX2x('wlName'+id,
                "{:url('select/materialjson')}",
                '',function (data) {
                    $(this).val(data.id);
                    $(this).closest('.input-group').hide();
                    $('#select'+id).show().find('.inin').html(data.key);
                    var rs = $('#thisWL'+id).attr('rs');
                    rs = JSON.parse(rs);

                    for(var i=0;i<rs.length;i++){
                        if(rs[i].id==data.id){
                            $('.unit'+id).html(rs[i].unit)
                            $('.factory'+id).html(rs[i].factory)
                        }
                    }
                }

            );
        }
        function a(id) {

           var al = 'feetype'+id;

           var s2 =  '{:url("BiHaiChaoSheng/selectList",["url"=>"Tifykm","where"=>"esuseway_2__channeltypes_$channeltype"])}?str='+al;


           entranceX('feetype'+id,
                "{:url('BiHaiChaoSheng/AjaxFYKU',['esuseway'=>'2','channeltypes'=>$channeltype])}",
                s2,
                '',function () {
                    if($("input[name=feetype"+id+"]").val()==''){
                        $('#isNull'+id).nextAll().remove();
                    }
                    else {
                        var FeiYonglxVal = $("input[name=feetype"+id+"]").val();
                        var FeiYonglxUrl = "{:url('BiHaiChaoSheng/get3KmDyfkfs')}?id="+FeiYonglxVal;
                        $.ajax({
                            url: FeiYonglxUrl,
                            type: 'get',
                            dataType: 'json',
                            success: function(data) {
                                if(data.code==200){
                                    var zi = '';
                                    var value = data.value;
                                    for (var i =0;i<value.length;i++){
                                        zi+='<option method="'+value[i].method+'" onclick="mu('+value[i].method+','+id+')"  value="'+value[i].id+'">'+value[i].title+'</option>';
                                    }
                                    $('#isNull'+id).after(zi);
                                    $('#xgcbzx'+id).on('click',function () {
                                        $('#myModal1'+id).modal('show');
                                    });
                                    $("#addyw"+id).click(function(){
//                                        var date= Date.parse(new Date());
                                        uploadTr(yangpingwuliao,'#YpWl'+id,'',h);
//                                        var str='<tr>'+
//                                            '<td>'+
//                                            '<div class="btn-group" style="border: 1px solid #ccc;border-radius: 6px;">'+
//                                            '<label class="btn btn-white" style="position: relative;">'+
//                                            '<input type="radio" name="options" id="option'+date+'" '+
//                                            'autocomplete="off" style="opacity: 0;position: absolute;">进货'+
//                                            '</label>'+
//                                            '<label class="btn btn-white active" style="position: relative;">'+
//                                            '<input type="radio" name="options" id="option2'+date+'" autocomplete="off" checked style="opacity: 0;position: absolute;"> 不进货'+
//                                            '</label>'+
//                                            '</div>'+
//                                            '</td>'+
//                                            '<td>'+
//                                            '<input type="text" class="form-control">'+
//                                            '</td>'+
//                                            '<td><input type="text" class="form-control" style="width: 80px"></td>'+
//                                            '<td></td>'+
//                                            '<td></td>'+
//                                            '<td></td>'+
//                                            '<td>'+
//                                            '<a class="btn btn-danger btn-bitbucket " onclick="del_this($(this),'+id+')">'+
//                                            '<i class="fa fa-trash-o"></i> 删除'+
//                                            '</a>'+
//                                            '</td>'+
//                                            '</tr>';
//                                        $("#ywTable"+id).append(str)
                                    })

                                }
                            }
                        });

                    }

                });
            $('#is_shoukuanF'+id).AddRadioX(
                [
                    {
                        title:'经销商',
                        name:'is_jinxiao',
                        className:'jinxiao',
                        isTrue:false,
                        value:1,
                        fun:function (obj) {
                            $(obj).click(function(){
                                $(this).parent('label').siblings().removeClass('active');
                                $(this).parent('label').addClass('active');
                                $('input[name=payee'+id+']').val('{$jxsid}');

                                $("#payee"+id).hide();

                            });
                        }
                    },
                    {
                        title:'供应商',
                        name:'is_gonghuo',
                        className:'gonghuo',
                        isTrue:true,
                        value:0,
                        fun:function (obj) {
                            $(obj).click(function(){
                                $(this).parent('label').siblings().removeClass('active')
                                $(this).parent('label').addClass('active');
                                closeX('payee'+id);
                                $("#payee"+id).show();
                            })

                        }
                    }

                ]
            );
            entranceX2('payee'+id,
                "{:url('BiHaiChaoSheng/getGYS')}",
                '');
            entranceX2('cl_type'+id,
                "{:url('BiHaiChaoSheng/AjaxCL',['type'=>1])}",
                '');
            entranceX2('cl_place'+id,
                "{:url('BiHaiChaoSheng/AjaxCL',['type'=>2])}",
                '');
            entranceX2('cl_size'+id,
                "{:url('BiHaiChaoSheng/AjaxCL',['type'=>3])}",
                '');

            $("#multiples"+id).select2({
                ajax: {
                    url: "{:url('BiHaiChaoSheng/ajaxJXSALL')}",
                    dataType: 'json',
                    data: function (params) {
                        var query = { //请求的参数, 关键字和搜索条件之类的
                            search: params.term //select搜索框里面的value
                        }

                        // Query paramters will be ?search=[term]&page=[page]
                        return query;
                    },
                    delay: 1500,
                    processResults: function (data, params) {
                        //返回的选项必须处理成以下格式
                        //var results =  [{ id: 0, text: 'enhancement' }, { id: 1, text: 'bug' }, { id: 2, text: 'duplicate' }, { id: 3, text: 'invalid' }, { id: 4, text: 'wontfix' }];
                        var results = data;
                        return {
                            results: results  //必须赋值给results并且必须返回一个obj
                        };
                    }

                },
                allowClear: true,
                multiple: true
            }).on("change",function(){
                setSelect(id);

            });
          //  var multiples =  $("#multiples"+id).select2({

//                placeholder: "",

//                data: [{id: 10001, text: '东南大区'},
//                    {id: 10002, text: '西北大区'},
//                    {id: 10003, text: '华东大区'},
//                    {id: 10004, text: '华北大区'},
//                    {id: 10005, text: '北方大区'},
//                ]
//            }).on("change",function(){
//                setSelect(id);
//
//            });


            $("#multiples"+id).val([10001,10003]).trigger('change');
            setSelect(id);

        }
        uploadTr(feiyongxiagqing,'#FeiYongLeiXingList','',a);
        /*添加一行*/
        function addHang(){
            uploadTr(feiyongxiagqing,'#FeiYongLeiXingList','',a);
        }
        //客户详情
            //系统
            function b(id) {
                entranceX('JinXiaoShang'+id,
                    "{:url('BiHaiChaoSheng/AjaxJXS',['jxs'=>$channeltype])}",
                    '{:url("BiHaiChaoSheng/selectList",["url"=>"Tixt","where"=>"jxs_$channeltype"])}?str=JinXiaoShang'+id,
                    '',
                    '');
            }
            uploadTr(kehuxiaongqingXitong,'#JinXiaoShangZhu','',b)
            function addHang2(){
                uploadTr(kehuxiaongqingXitong,'#JinXiaoShangZhu','',b)
            }
           // 网点
            entranceX('WangDian',
                "{:url('BiHaiChaoSheng/AjaxWD',['jxs'=>$channeltype])}",
                '{:url("BiHaiChaoSheng/selectList",["str"=>"WangDian","url"=>"Tiwd","where"=>"jxs_$channeltype"])}',
                '',
                '');
        //产品详情
            function showTable(obj,su){
                obj.parent('label').siblings('label').removeClass('active')
                obj.parent('label').addClass('active');
                for (var io =0;io<5;io++){
                    $("#proTable"+io).hide();

                }
                $("#proTable"+su).show();
                if(su==4){
                    $("#proText").text("注：如选择单品类，则各单品费用将会平摊。如不希望平摊，请填写多次明细。");
                }else {
                    $("#proText").text("注：产品费用占比加起来必须等于100%,如果不填费用占比则平摊");
                }

            }
            //品牌
            function c(id) {
                entranceX('proTableInput0'+id,
                    "{:url('BiHaiChaoSheng/getCp',['type'=>2,'style'=>1])}",
                    '{:url("BiHaiChaoSheng/selectList",["url"=>"getCp","where"=>"type_1__style_1"])}?str=proTableInput0'+id,
                    '',
                    '');
            }
            uploadTr(changpingxianqin1,'#Cpxq0','',c);
            function addHang3(){
                uploadTr(changpingxianqin1,'#Cpxq0','',c);
            }
            //品类
            function d(id) {
                entranceX('proTableInput1'+id,
                    "{:url('BiHaiChaoSheng/getCp',['type'=>2,'style'=>2])}",
                    '{:url("BiHaiChaoSheng/selectList",["url"=>"getCp","where"=>"type_1__style_2"])}?str=proTableInput1'+id,
                    '',
                    '');
            }
            uploadTr(changpingxianqin2,'#Cpxq1','',d);
            function addHang4(){
                uploadTr(changpingxianqin2,'#Cpxq1','',d);
            }
            //系列
            function e(id) {
                entranceX('proTableInput2'+id,
                    "{:url('BiHaiChaoSheng/getCp',['type'=>2,'style'=>3])}",
                    '{:url("BiHaiChaoSheng/selectList",["url"=>"getCp","where"=>"type_1__style_3"])}?str=proTableInput2'+id,
                    '',
                    '');
            }
            uploadTr(changpingxianqin3,'#Cpxq2','',e);
            function addHang5(){
                uploadTr(changpingxianqin3,'#Cpxq2','',e);
            }
            //Sku
            function f(id) {
                entranceX('proTableInput3'+id,
                    "{:url('BiHaiChaoSheng/getCp',['type'=>2,'style'=>4])}",
                    '{:url("BiHaiChaoSheng/selectList",["url"=>"getCp","where"=>"type_1__style_4"])}?str=proTableInput3'+id,
                    '',
                    '');
            }
            uploadTr(changpingxianqin4,'#Cpxq3','',f);
            function addHang6(){
                uploadTr(changpingxianqin4,'#Cpxq3','',f);
            }
            //单品
            function g(id) {
                entranceX('proTableInput4'+id,
                    "{:url('BiHaiChaoSheng/getCp',['type'=>2,'style'=>5])}",
                    '{:url("BiHaiChaoSheng/selectList",["url"=>"getCp","where"=>"type_1__style_5"])}?str=proTableInput4'+id,
                    '',
                    '');
            }
            uploadTr(changpingxianqin5,'#Cpxq4','',g);
            function addHang7(){
                uploadTr(changpingxianqin5,'#Cpxq4','',g);
            }
        //选择按钮
        $('#is_shejixiaoliang').AddRadioX(
            [
                {
                    title:'涉及销量',
                    name:'is_shejixiaoliang',
                    className:'shengji',
                    isTrue:false,
                    value:1,
                    fun:function (obj) {
                        $(obj).click(function(){
                            $(this).parent('label').siblings('label').removeClass('active')
                            $(this).parent('label').addClass('active');
                            $("#sallycTable tbody tr td").find('input').attr('disabled',false);
                            $("#sallycTable tbody tr td").find('select').attr('disabled',false);
                        });
                    }
                },
                {
                    title:'不涉及销量',
                    name:'is_shejixiaoliang',
                    className:'busheji',
                    isTrue:true,
                    value:0,
                    fun:function (obj) {
                        $(obj).click(function(){
                            $(this).parent('label').siblings('label').removeClass('active')
                            $(this).parent('label').addClass('active');
                            $("#sallycTable tbody tr td").find('input').attr('disabled',true);
                            $("#sallycTable tbody tr td").find('select').attr('disabled',true);
                        })

                    }
                }

            ]
        );
        $('#is_kehuxiangqing').AddRadioX(
            [
                {
                    title:'经销商',
                    name:'is_kehuxiangqing',
                    className:'khjinxiaoshnag',
                    isTrue:false,
                    value:1,
                    fun:function (obj) {
                        $(obj).click(function(){
                            $(this).parent('label').siblings('label').removeClass('active')
                            $(this).parent('label').addClass('active')
                            $("#angencyTable").show();
                            $("#sysTable").hide();
                            $("#netTable").hide();
                        });
                    }
                },
                {
                    title:'系统',
                    name:'is_kehuxiangqing',
                    className:'khxitong',
                    isTrue:true,
                    value:0,
                    fun:function (obj) {
                        $(obj).click(function(){
                            $(this).parent('label').siblings('label').removeClass('active');
                            $(this).parent('label').addClass('active');
                            $("#angencyTable").hide();
                            $("#sysTable").show();
                            $("#netTable").hide();
                        })

                    }
                },
                {
                    title:'网点',
                    name:'is_kehuxiangqing',
                    className:'khwangdian',
                    isTrue:false,
                    value:0,
                    fun:function (obj) {
                        $(obj).click(function(){
                            $(this).parent('label').siblings('label').removeClass('active')
                            $(this).parent('label').addClass('active')
                            $("#angencyTable").hide();
                            $("#sysTable").hide();
                            $("#netTable").show();
                        })

                    }
                }

            ]
        );
        $('#is_changpingxiangqin').AddRadioX(
            [
                {
                    title:'品牌',
                    name:'is_cpxq',
                    className:'cpxqpp',
                    isTrue:true,
                    value:1,
                    fun:function (obj) {
                        $(obj).click(function(){
                            showTable($(this),0);
                        });
                    }
                },
                {
                    title:'品类',
                    name:'is_cpxq',
                    className:'cpxqpl',
                    isTrue:false,
                    value:0,
                    fun:function (obj) {
                        $(obj).click(function(){
                            showTable($(this),1);
                        })

                    }
                },
                {
                    title:'系列',
                    name:'is_cpxq',
                    className:'cpxqxl',
                    isTrue:false,
                    value:0,
                    fun:function (obj) {
                        $(obj).click(function(){
                            showTable($(this),2);
                        })

                    }
                },
                {
                    title:'SKU',
                    name:'is_cpxq',
                    className:'cpxqsku',
                    isTrue:false,
                    value:0,
                    fun:function (obj) {
                        $(obj).click(function(){
                            showTable($(this),3);
                        })

                    }
                },
                {
                    title:'单品',
                    name:'is_cpxq',
                    className:'cpxqdp',
                    isTrue:false,
                    value:0,
                    fun:function (obj) {
                        $(obj).click(function(){
                            showTable($(this),4);
                        })

                    }
                }

            ]
        );


</script>
</body>

</html>